TArray.BinarySearch<T>(T[],T,Integer,TComparison) Method

Searches a sorted array for the given value, using a binary search algorithm returning the index for the first found value using the specified comparison.

Namespace: Spring
public
 class function BinarySearch<T>(const values: array of T; const item: T;
 out foundIndex: Integer; const comparison: TComparison<T>): Boolean; overload; static;

Type Parameters

T

Parameters

values
Type: array of T

item
Type: T

foundIndex
Type: Integer

comparison
Type: TComparison<T>

Return Value

Type: Boolean